/*
 * @Author: your name
 * @Date: 2022-01-19 14:52:44
 * @LastEditTime: 2022-02-11 16:51:13
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \vue-element-admin\src\store\modules\division.js
 */
import { linkmanAdd , linkmanEdit,linkmanSelOne,linkmanList,linkmanGirdData,attachmentList,attachmentSave} from '@/api/linkman'

const state = {
 
}

const mutations = {
 
}

const actions = {
    linkmanAdd({ commit }, formData) {
    return new Promise((resolve, reject) => {
        linkmanAdd(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  linkmanEdit({ commit }, formData) {
    return new Promise((resolve, reject) => {
        linkmanEdit(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  linkmanSelOne({ commit }, formData) {
    return new Promise((resolve, reject) => {
        linkmanSelOne(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  linkmanList({ commit }, formData) {
    return new Promise((resolve, reject) => {
        linkmanList(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  linkmanGirdData({ commit }, formData){
    return new Promise((resolve, reject) => {
      linkmanGirdData(formData).then(response => {
      // const { data } = response
      resolve(response)
    }).catch(error => {
      reject(error)
    })
  })
  },
  attachmentList({ commit }, formData){
    return new Promise((resolve, reject) => {
      attachmentList(formData).then(response => {
      // const { data } = response
      resolve(response)
    }).catch(error => {
      reject(error)
    })
  })
  },
  attachmentSave({ commit }, formData){
    return new Promise((resolve, reject) => {
      attachmentSave(formData).then(response => {
      // const { data } = response
      resolve(response)
    }).catch(error => {
      reject(error)
    })
  })
  },

}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
